<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>事件处理-内联处理器中的方法</title>
    <script src="https://cdn.jsdelivr.net/npm/vue"></script>
</head>
<body>
<div id="app">
    <!--注意greet里传入的参数要有单引号-->
    <button v-on:click="greet('hi')">Greet_hi</button>
    <button v-on:click="greet('hello')">Greet_hello</button>
</div>


<script>
    var app= new Vue({
        el:'#app',
        data:{
            name: 'Vue.js'
        },
        methods:{
            greet:function (message) {
                console.log(message)
            }
        }
    })
</script>
</body>
</html>
